package com.bill.dao;

import com.bill.pojo.Bill;
import com.bill.pojo.Bills;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BillsMapper {

    //bills表-查询所有
    @Select("select * from bills")
    List<Bills> findBillsAll();

    //bill_type表-查询所有
    @Select("select * from bill_type")
    List<Bill> findBill_typeAll();

    //根据类型/时间查询
    List<Bills> queryTypeTimeBills(@Param("type_id") int type_id,
                                   @Param("startTime") String startTime,
                                   @Param("endTime") String endTime);

    //添加-记账
    int insertBills(@Param("bills") Bills bills);

}
